# -*- coding: utf-8 -*-
from Tkinter import *


root=Tk()
root.title('My Prog')
root.geometry("+250+350")#("600x400+250+350")

button1=Button(root,text='button1',width=20,bg='black',fg='red',font='arial 14')
button1.pack()

nn=Label(root,text='label',font='arial 14')
nn.pack()

pole=Entry(root,text='label',font='arial 14')
pole.pack()

button2=Button(root,text='button2',font='arial 10')
button2.pack()

text1=Text(root,height=2,width=20,font='Arial 14',wrap=WORD)
text1.pack()


listbox1=Listbox(root,height=5,width=20,selectmode=SINGLE)
list1=[u"Москва",u"Санкт-Петербург",u"Саратов",u"Омск"]
for i in list1: listbox1.insert(END,i)
listbox1.pack()


var1=IntVar()
var2=IntVar()
check1=Checkbutton(root,text=u'1 пункт',variable=var1,onvalue=1,offvalue=0)
check2=Checkbutton(root,text=u'2 пункт',variable=var2,onvalue=1,offvalue=0)
check1.pack()
check2.pack()


var=IntVar()
rbutton1=Radiobutton(root,text='1',variable=var,value=1)
rbutton2=Radiobutton(root,text='2',variable=var,value=2)
rbutton1.pack()
rbutton2.pack()

#button1.grid(row=1,column=0)
#button2.grid(row=1,column=1)
#button3.grid(row=1,column=2)





def getV(root):
    a = scale1.get()
    print u"Значение", a 
scale1 = Scale(root,orient=HORIZONTAL,length=300,from_=50,to=80,tickinterval=5,
               resolution=5)
button1 = Button(root,text=u"Получить значение")
scale1.pack()
button1.pack()
button1.bind("<Button-1>",getV)



text = Text(root, height=3, width=60)
text.pack(side='left')
scrollbar = Scrollbar(root)
scrollbar.pack()
# первая привязка
scrollbar['command'] = text.yview
# вторая привязка
text['yscrollcommand'] = scrollbar.set
root.mainloop()



root.mainloop()
